package 分巧克力;

import java.util.Scanner;

public class Main {
    static int N = 100010, n, k;
    static int[] h = new int[N];
    static int[] w = new int[N];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        k = in.nextInt();
        for (int i = 0; i < n; i++) {
            h[i] = in.nextInt();
            w[i] = in.nextInt();
        }
        int l = 1, r = 100000;
        while (l < r) {
            int mid = l + r + 1 >> 1;
            if (check(mid)) {
                l = mid;
            } else {
                r = mid - 1;
            }
        }
        System.out.println(l);
    }

    private static boolean check(int mid) {
        long res = 0;
        for (int i = 0; i < n; i++) {
            res += (h[i] / mid) * (w[i] / mid);
            if (res >= k) {
                return true;
            }
        }
        return false;
    }
}
